package com.kolakcc.loljclient.model;

import java.util.ArrayList;

import com.gvaneyck.rtmp.TypedObject;

public class CustomGameDetailed {
	public ArrayList<CustomGamePlayer> team1;
	public ArrayList<CustomGamePlayer> team2;

	public CustomGameDetailed(TypedObject to) {
		System.out.print("Got detailed custom game data: ");
		System.out.println(to);
		this.team1 = new ArrayList<CustomGamePlayer>();
		for (Object teamPlayer : to.getArray("teamOne")) {
			TypedObject castedTeamPlayer = (TypedObject) teamPlayer;
			this.team1.add(new CustomGamePlayer(castedTeamPlayer));
		}
		this.team2 = new ArrayList<CustomGamePlayer>();
		for (Object teamPlayer : to.getArray("teamTwo")) {
			TypedObject castedTeamPlayer = (TypedObject) teamPlayer;
			this.team2.add(new CustomGamePlayer(castedTeamPlayer));
		}
	}
}
